package edu.scau.pos.vo;

import edu.scau.core.Enum.ColorEnum;
import edu.scau.core.Enum.SizeEnum;
import edu.scau.pos.domain.Category;
import edu.scau.sku.domain.Sku;
import edu.scau.sku.domain.SkuColorSize;
import edu.scau.sku.vo.SkuColorSizeVo;
import edu.scau.sku.vo.SkuVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

@Data

public class ProductVo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Schema(name = "productId", description = "商品自增标识ID", type = "Long")
    private long productId;
    @Schema(name = "productSn", description = "商品唯一标识", type = "String")
    @NotBlank(message = "商品编号不能为空")
    private String productSn;
    @Schema(name = "productName", description = "商品名称", type = "String")
    private String productName;
    @Schema(name = "size", description = "商品尺寸信息", implementation = SizeEnum.class)
    private String size;
    @Schema(name = "color", description = "商品颜色信息", implementation = ColorEnum.class)
    private String color;
    @Schema(name = "categoryId", description = "商品所属分类", type = "Long")
    private Long categoryId;
    @Schema(name = "categoryVo", description = "商品所属分类", implementation = CategoryVo.class)
    private CategoryVo categoryVo;
    @Schema(name = "skuCode", description = "该商品对应的库存信息", type = "String")
    private String skuCode;
    @Schema(name = "skuVo", description = "该商品对应的库存信息", implementation = SkuVo.class)
    private SkuVo skuVo;
    //    @Schema(name = "skuColorSize",description = "该商品对应的库存信息",implementation = SkuColorSizeVo.class)
//    private SkuColorSize skuColorSize;
    @Schema(name = "price", description = "商品单价信息", type = "double")
    private double price;
    @Schema(name = "url", description = "商品图片链接信息", type = "String")
    private String url;
    @Schema(name = "desc", description = "商品详情描述", type = "String")
    private String desc;

    public ProductVo(long productId, String productSn, String productName, String size, String color, Long categoryId, CategoryVo categoryVo, String skuCode, SkuVo skuVo, String desc) {
        this.productId = productId;
        this.productSn = productSn;
        this.productName = productName;
        this.size = size;
        this.color = color;
        this.categoryId = categoryId;
        this.categoryVo = categoryVo;
        this.skuCode = skuCode;
        this.skuVo = skuVo;
        this.desc = desc;
    }

    public ProductVo() {
    }
}
